package com.cloud.mall.sms.service;

import com.cloud.mall.api.CommonPage;
import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.sms.dto.SmsCouponParam;
import com.cloud.mall.sms.dto.product.HomeFlashPromotion;
import com.cloud.mall.sms.input.SmsFlashPromotionInpDTO;
import com.cloud.mall.sms.out.SmsCouponHistoryOut;
import com.cloud.mall.sms.out.SmsFlashPromotionOut;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@Api(tags = "限时购活动管理")
@RequestMapping("/flash")
public interface SmsFlashPromotionService {


    @ApiOperation("添加活动")
    @PostMapping("/create")
    BaseResponse create(@RequestBody SmsFlashPromotionInpDTO flashPromotionInpDTO);

    @ApiOperation("编辑活动信息")
    @PostMapping("/update/{id}")
    BaseResponse update(@PathVariable Long id,
                        @RequestBody SmsFlashPromotionInpDTO flashPromotionInpDTO);

    @ApiOperation("删除活动信息")
    @PostMapping("/delete/{id}")
    BaseResponse delete(@PathVariable Long id);

    @ApiOperation("修改上下线状态")
    @PostMapping("/update/status/{id}")
    BaseResponse update(@PathVariable Long id,@RequestParam Integer status);

    @ApiOperation("获取活动详情")
    @GetMapping("/{id}")
    BaseResponse<SmsFlashPromotionOut> getItem(@PathVariable Long id);

    @ApiOperation("根据活动名称分页查询")
    @GetMapping("/list")
    BaseResponse<CommonPage<SmsFlashPromotionOut>> getItem(@RequestParam(value = "keyword", required = false) String keyword,
                          @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                          @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);


    @ApiOperation("根据时间获取秒杀活动")
    @GetMapping("/getHomeFlashPromotion")
    BaseResponse<HomeFlashPromotion> getHomeFlashPromotion();

}
